package com.example.natatorium_management.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.natatorium_management.entity.Gymnasium;
import com.example.natatorium_management.result.restful.R;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface GymnasiumMapper extends BaseMapper<Gymnasium> {
    IPage<Gymnasium> QueryPage(IPage<Gymnasium> page);
    Gymnasium findGymnasiumById(int gymnasiumId);

    int updateGymnasium(Gymnasium gymnasium);

    IPage<Gymnasium> findGymnasiumByName(IPage<Gymnasium> page, @Param("gymnasiumName")String gymnasiumName);

    IPage<Gymnasium> findGymnasiumByPhone(IPage<Gymnasium> page, @Param("phone")Long phone);

    IPage<Gymnasium> findGymnasiumByNameAndPhone(IPage<Gymnasium> page,@Param("gymnasium")Gymnasium gymnasium);

}
